<template>
  <div class="about">
    <h1>This is an about page</h1>
    <input type="number" v-model="fatherValue">
    <button @click="passMoney">转账</button>
    <br/>
    <span>父组件收到的子组件的消息：{{sonValue}}</span>
    <!-- <SonComp :msg="fatherValue"></SonComp> -->
    <CallFather :msg="money" @comfire="msgMethod"></CallFather>
  </div>
</template>
<script>
import SonComp from '@/components/sonComp.vue';
import CallFather from '@/components/callFather.vue';
export default{
  data() {
    return {
      fatherValue:0,
      sonValue:"",
      money:0
    }
  },
    components: { SonComp, CallFather },
    methods:{
      passMoney(){
        this.money = this.fatherValue
      },
      msgMethod(value){
         console.log("父组件的方法中打印：",value);
         this.sonValue = value;
      }
    }

}  
</script>
